﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="CrossFactory.SiteNote.Admin.Login" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Login</title>
	<link rel="stylesheet" type="text/css" href="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/StyleSheets/StyleSheet.aspx" />
	<script type="text/javascript" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/JScript/jquery-1.4.2.min.js"></script>
	<style type="text/css">
	    
		.logtable
	    {
	        margin:auto;
	        margin-top:15%;
	    }
        
	</style>

</head>
<body>
	<form id="Login" method="post" runat="server" autocomplete="off">
		<table class="logtable">
		    <tr>
		        <td class="logtd">
		            <table id="IEBrowser"  border="0" cellpadding="0" cellspacing="0">
			            <tr>
				            <td colspan="3" style="vertical-align:bottom; height:54px; background: url(<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Login/ImgTop.gif) no-repeat;"></td>
			            </tr>
			            <tr>
				            <td style="width:59px;background:url(<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Login/ImgLeft.gif) no-repeat #245176;" ></td>
				            <td style="width:325px;background-color:#245176;padding-top:5px;">
                                <SiteNoteControls:Login runat="server" ID="Login2" InAdminMode="true" LoginClass="SiteNoteLogin" AlignMode="" ImgUrl="_Sitenote/Admin/Images/Login/SitenoteLoginBtn.gif" PasswordReminder="true" PasswordReminderEmailSubject="SiteNOTE credentials" />
                            </td>
				            <td style="width:70px;background:url(<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Login/ImgRight.gif) no-repeat;"></td>
			            </tr>
			            <tr>
				            <td colspan="3" style="height:15px; background: url(<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/Login/ImgBottom.gif) no-repeat;"></td>
			            </tr>
		            </table>
		            <table id="NotIEBrowser" style="margin:0 auto;padding-top:25px;" border="0" cellpadding="0" cellspacing="0">
		                <tr>
		                    <td style="text-align:center">Sorry, SiteNOTE requires IE6 or IE7.<br /><a style="color:blue" href="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.RootPage %>.aspx">Back to website</a></td>
		                </tr>
		            </table>
		        </td>
		    </tr>
		</table>
    </form>
</body>

	<script language="javascript" type="text/javascript">
	    var message = "";
	    var browserKO = false; 
	    
	    if(navigator.appName == 'Microsoft Internet Explorer')
	    {
	        var uAgent =navigator.userAgent.toLowerCase();
	    
	        var start = uAgent.indexOf('(') + 1;
            var end = uAgent.indexOf(')');
            var str = uAgent.substring(start, end);
            var info = str.split('; ');

            if (uAgent.indexOf('msie') != -1) 
            {
              str = info[1].substring(5, info[1].length);
              version = parseFloat(str);
              
              if(version < 6)
              {
                   browserKO = true;
              }
              if(version > 8)
              {
                   browserKO = true;
              }
            }
            else
            {
                browserKO = true;
            }
	    }
	    else
	    {
	        browserKO = true;
	    }
	    
	    if(browserKO)
	    {
	       //alert("SiteNote require IE6 or IE7.");
	       document.getElementById("IEBrowser").setAttribute("style","display:none");
	       document.getElementById("IEBrowser").style.display = "none";
	    }
	    else
	    {
	        document.getElementById("NotIEBrowser").setAttribute("style","display:none");
	        document.getElementById("NotIEBrowser").style.display = "none";
	    }
	</script>
	
</html>
